<template>
	<view>
		<view class="py-2 font-md">搜索历史</view>
		<view class="flex flex-wrap">
			<view class="border rounded font mx-2 my-1 px-2 text-info" v-for="i in list" >{{ i }}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				seach:'',
				list:['APP 学习计划','我会成功的','搜索一切不可能']
			}
		},
		// 监听键盘搜索
		onNavigationBarSearchInputConfirmed(e){
			console.log(e);
			console.log('123')
			this.list.push(this.seach)
			uni.hideKeyboard()
		},
		// 监听输入框内容
		onNavigationBarSearchInputChanged(e){
			console.log(e);
			this.seach = e.text;
			
			console.log('456')
		},
		//监听搜索按钮
		onNavigationBarButtonTap(e){
			console.log(this.seach)
			this.list.push(this.seach)
			uni.hideKeyboard()
		},
		methods: {
			
		}
	}
</script>

<style>
@import "../../common/free.css"
</style>
